package cn.supermarket.system.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 商品信息表
 * @TableName t_product
 */
@TableName(value ="t_product")
@Data
public class TProduct implements Serializable {
    /**
     * 商品信息ID
     */
    @TableId(type = IdType.ASSIGN_ID)
    private String productInformationId;

    /**
     * 供应商编号
     */
    private String supplierId;

    /**
     * 商品编号
     */
    private String commodityNumber;

    /**
     * 品牌
     */
    private String brand;

    /**
     * 规格
     */
    private String specifications;

    /**
     * 标题
     */
    private String cartTitle;

    /**
     * 封面图
     */
    private String cartImg;

    /**
     * 描述
     */
    private String cartDescription;

    /**
     * 原价
     */
    private Double cartPriceAgo;

    /**
     * 卖价
     */
    private Double cartPrice;

    /**
     * 商品分类
     */
    private String cartType;

    /**
     * 正文
     */
    private String cartContent;

    /**
     * 图片1
     */
    private String cartImg1;

    /**
     * 图片2
     */
    private String cartImg2;

    /**
     * 图片3
     */
    private String cartImg3;

    /**
     * 图片4
     */
    private String cartImg4;

    /**
     * 图片5
     */
    private String cartImg5;

    /**
     * 创建人
     */
    private String createBy;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 更新时间
     */
    private Date updateTime;

    /**
     * 更新人
     */
    private String updateBy;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @TableField(exist = false)
    private String supplierName;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        TProduct other = (TProduct) that;
        return (this.getProductInformationId() == null ? other.getProductInformationId() == null : this.getProductInformationId().equals(other.getProductInformationId()))
            && (this.getSupplierId() == null ? other.getSupplierId() == null : this.getSupplierId().equals(other.getSupplierId()))
            && (this.getCommodityNumber() == null ? other.getCommodityNumber() == null : this.getCommodityNumber().equals(other.getCommodityNumber()))
            && (this.getBrand() == null ? other.getBrand() == null : this.getBrand().equals(other.getBrand()))
            && (this.getSpecifications() == null ? other.getSpecifications() == null : this.getSpecifications().equals(other.getSpecifications()))
            && (this.getCartTitle() == null ? other.getCartTitle() == null : this.getCartTitle().equals(other.getCartTitle()))
            && (this.getCartImg() == null ? other.getCartImg() == null : this.getCartImg().equals(other.getCartImg()))
            && (this.getCartDescription() == null ? other.getCartDescription() == null : this.getCartDescription().equals(other.getCartDescription()))
            && (this.getCartPriceAgo() == null ? other.getCartPriceAgo() == null : this.getCartPriceAgo().equals(other.getCartPriceAgo()))
            && (this.getCartPrice() == null ? other.getCartPrice() == null : this.getCartPrice().equals(other.getCartPrice()))
            && (this.getCartType() == null ? other.getCartType() == null : this.getCartType().equals(other.getCartType()))
            && (this.getCartContent() == null ? other.getCartContent() == null : this.getCartContent().equals(other.getCartContent()))
            && (this.getCartImg1() == null ? other.getCartImg1() == null : this.getCartImg1().equals(other.getCartImg1()))
            && (this.getCartImg2() == null ? other.getCartImg2() == null : this.getCartImg2().equals(other.getCartImg2()))
            && (this.getCartImg3() == null ? other.getCartImg3() == null : this.getCartImg3().equals(other.getCartImg3()))
            && (this.getCartImg4() == null ? other.getCartImg4() == null : this.getCartImg4().equals(other.getCartImg4()))
            && (this.getCartImg5() == null ? other.getCartImg5() == null : this.getCartImg5().equals(other.getCartImg5()))
            && (this.getCreateBy() == null ? other.getCreateBy() == null : this.getCreateBy().equals(other.getCreateBy()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getUpdateBy() == null ? other.getUpdateBy() == null : this.getUpdateBy().equals(other.getUpdateBy()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getProductInformationId() == null) ? 0 : getProductInformationId().hashCode());
        result = prime * result + ((getSupplierId() == null) ? 0 : getSupplierId().hashCode());
        result = prime * result + ((getCommodityNumber() == null) ? 0 : getCommodityNumber().hashCode());
        result = prime * result + ((getBrand() == null) ? 0 : getBrand().hashCode());
        result = prime * result + ((getSpecifications() == null) ? 0 : getSpecifications().hashCode());
        result = prime * result + ((getCartTitle() == null) ? 0 : getCartTitle().hashCode());
        result = prime * result + ((getCartImg() == null) ? 0 : getCartImg().hashCode());
        result = prime * result + ((getCartDescription() == null) ? 0 : getCartDescription().hashCode());
        result = prime * result + ((getCartPriceAgo() == null) ? 0 : getCartPriceAgo().hashCode());
        result = prime * result + ((getCartPrice() == null) ? 0 : getCartPrice().hashCode());
        result = prime * result + ((getCartType() == null) ? 0 : getCartType().hashCode());
        result = prime * result + ((getCartContent() == null) ? 0 : getCartContent().hashCode());
        result = prime * result + ((getCartImg1() == null) ? 0 : getCartImg1().hashCode());
        result = prime * result + ((getCartImg2() == null) ? 0 : getCartImg2().hashCode());
        result = prime * result + ((getCartImg3() == null) ? 0 : getCartImg3().hashCode());
        result = prime * result + ((getCartImg4() == null) ? 0 : getCartImg4().hashCode());
        result = prime * result + ((getCartImg5() == null) ? 0 : getCartImg5().hashCode());
        result = prime * result + ((getCreateBy() == null) ? 0 : getCreateBy().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getUpdateBy() == null) ? 0 : getUpdateBy().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", productInformationId=").append(productInformationId);
        sb.append(", supplierId=").append(supplierId);
        sb.append(", commodityNumber=").append(commodityNumber);
        sb.append(", brand=").append(brand);
        sb.append(", specifications=").append(specifications);
        sb.append(", cartTitle=").append(cartTitle);
        sb.append(", cartImg=").append(cartImg);
        sb.append(", cartDescription=").append(cartDescription);
        sb.append(", cartPriceAgo=").append(cartPriceAgo);
        sb.append(", cartPrice=").append(cartPrice);
        sb.append(", cartType=").append(cartType);
        sb.append(", cartContent=").append(cartContent);
        sb.append(", cartImg1=").append(cartImg1);
        sb.append(", cartImg2=").append(cartImg2);
        sb.append(", cartImg3=").append(cartImg3);
        sb.append(", cartImg4=").append(cartImg4);
        sb.append(", cartImg5=").append(cartImg5);
        sb.append(", createBy=").append(createBy);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", updateBy=").append(updateBy);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}